package com.stu.rocketmq.test;

import java.math.BigDecimal;

public class Animal {


    public static void main(String[] args) {
        double v = regeCount(10.97 * 1000 * (1+0.4303), 6);
        System.out.println(v);
    }


    public static double regeCount(double value,int a){
        BigDecimal bigDecimal = new BigDecimal(value);
        for (int i=0;i<a;i++){
            bigDecimal = bigDecimal.multiply(new BigDecimal(1+0.1));
        }
        BigDecimal bigDecimal2 = new BigDecimal(value);
        bigDecimal = bigDecimal.subtract(bigDecimal2);
        return bigDecimal.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
    }

     public static double log(double value, double base) {
        return Math.log(value) / Math.log(base);
    }









    public void move(){
        System.out.println("动物可以移动。");
    }

}
class Dog extends Animal{

    @Override
    public void move() {
        System.out.println("狗可以跑。");
    }
    public void bark(){
        System.out.println("狗会汪汪叫。");
    }
}